# include<Arduino.h>
# include<Ticker.h>
# include "ganix/spiffs.hpp"
# include "logic/connection_manager.hpp"
# include "logic/actions.hpp"
# include "logic/global.hpp"
# include "logic/http_actions.hpp"
# include "logic/circuit/circuit_logic.hpp"

void setup() {
  Serial.begin(115200);
  randomSeed( analogRead( A0 ) );
  init_rpc_handler();
  conn_mgr.init();
  ganix::http_server::init();
  regist_global_actions();
  circuit_init();
  ganix::fs::init();
  init_io_action_config();
  Serial.println("init finish.");
}

void loop() {
  conn_mgr.loop();
  circuit_loop();
}
